/**
 * 
 */
package tests.acceptanceTests;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import sourceFiles.CentralComputer;
import sourceFiles.SupervisorStation;

/**
 * @author LASO-TEAM
 * 
 *         This test checks that a supervisor can edit the parameters of the
 *         rides in the park.
 * 
 */
public class AcceptanceTest3 extends AcceptanceTests {

	private final int MAX_CAPACITY = 1;
	private final int MIN_AGE = 6;
	private final int MIN_HEIGHT =90;
	
	
	/**
	 * @throws java.lang.Exception
	 */
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		// this initializes the relevant classes for this test.
		String currentPath = new java.io.File(".").getCanonicalPath();
		currentPath = currentPath + IN_PROJECT_PATH_TO_TESTS;
		masterXMLFilePath = currentPath + "\\input\\TestsMaster3.xml";
		copyXMLFilePath = currentPath + "\\results\\AcceptanceTests3Result.xml";
	}

	/**
	 * copies the master test file to the new file that we are generating.
	 */
	@Before
	public void setUp() throws Exception {
		copySourceFile();
		centralComputer = new CentralComputer(copyXMLFilePath);
		supervisorStation = new SupervisorStation(centralComputer);
	}

	@Test
	public void test() {
		for (int i = 0; i < rideNames.length; i++) {
			try {
				supervisorStation.editRideParams(i+1, MAX_CAPACITY, MIN_AGE, MIN_HEIGHT);
			} catch (Exception e) {
				fail("supposed to succeed. all the params are valid.");
			}

		}
	}

}
